Skip to content

fix(web): keep Windows thread notifications clickable until handled - #22520

Merged
Yash-Singh1 merged 3 commits into
pingdotgg:mainfrom
AKolenda:fix/notification-click-opens-thread
Oct 26, 2026
Merged

Yash-Singh1 merged 3 commits into
pingdotgg:mainfrom
AKolenda:fix/notification-click-opens-thread

Conversation

@AKolenda

@AKolenda AKolenda commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Problem

On Windows, clicking a "Thread completed" notification often does nothing: T3 Code doesn't come forward and the thread doesn't open.

This happens when the click lands on an entry in Notification Center rather than on the live banner. Windows moves a toast there after about 7 seconds. At that point Electron fires the web close event and drops its notification object. A later click on the Notification Center entry reaches Electron's toast activator with empty arguments and no live object to dispatch to, so it is discarded and the renderer never gets click. Every alert you weren't watching when it popped up is a dead entry, and I had around 20 of them stacked under T3 Code (Nightly).

Repro (Windows 11, Electron 44.4.5, a minimal app with the same notification options and click handler as ThreadNotificationCoordinator):

  1. Start a thread and switch away so the completion alert is sent as a system notification.
  2. Wait for the banner to slide away (about 7s).
  3. Open Notification Center and click the entry. Nothing happens.

Clicking the banner while it is still on screen works.

Illustration (mockup, made-up thread names): the timed-out entry before, and the toast that stays up after.

before and after

Change

On Windows, "Thread completed" notifications are now created with requireInteraction, reusing the existing isWindowsPlatform helper. Electron then shows the toast as a reminder that stays on screen with a Dismiss button until it is clicked or dismissed, so the click still goes to the live notification and the existing handler opens the thread.

Alerts won't pile up while you're in the app: the coordinator already closes pending notifications when the window regains focus, and a newer alert for the same thread replaces the old one by tag. Attention alerts (input, approval, failed, usage limit) keep the normal timeout, because another client can resolve them while this window stays unfocused, and a sticky banner would then advertise an action that no longer exists. Other platforms are unchanged.

Scope and approval

This is a small, focused fix for an obvious bug, so there's no prior issue. It finishes the click-to-open behaviour from #12567, which raised the window on click for #12500 (Linux), for the case where the Windows click never reaches that handler.

The trade-off is that Windows completion alerts now stay on screen until handled instead of timing out. Attention alerts can still lose their click after timing out, since closing them when they're resolved elsewhere needs extra plumbing that would also change the badge count. Fixing clicks on timed-out entries would need Electron-side changes, because the activation carries no data that identifies the thread. Entries that already landed in Notification Center before this change are unaffected.

Verification

  • vp test run src/components/ThreadNotificationCoordinator.browser.test.tsx src/components/ThreadNotificationCoordinator.badge.browser.test.tsx: 37/37 pass.
    • New tests: a Windows completion gets requireInteraction: true, and a Windows "Input needed" alert gets false. Each fails when the matching half of the condition is removed.
    • The existing exact-option assertions expect false. setup() now pins navigator.platform so the suite doesn't depend on the host OS.
  • vp lint, vp fmt --check and tsc --noEmit are clean for apps/web.
  • Manual check on Windows 11 with Electron 44.4.5 and the minimal app above:
    • Before: close fired at about 7s, the banner left the screen, and clicking the Notification Center entry produced no click.
    • After: the toast was still on screen at 15s; clicking it fired click, which revealed and focused the window.

Not checked: a full T3 Code desktop build on Windows. The image above is a mockup rather than a screenshot, because my Notification Center showed unrelated private notifications.

Written by Claude Opus 5.5 (claude-opus-5-5) in Claude Code, running inside T3 Code. Independently reviewed before filing by GPT-6.1-Sol (gpt-6.1-sol, reasoning effort medium, fast service tier) via a T3 Code delegated task. Verdict: approve after three rounds. Round one flagged that the exact-option tests depended on the host OS. Round three covered the follow-up that keeps attention alerts on the normal timeout. Both are fixed.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants